package cn.tedu.icop.basic.dao.repository.impl;
import cn.tedu.icop.basic.dao.mapper.StationMapper;
import cn.tedu.icop.basic.dao.repository.StationRepository;
import cn.tedu.icop.basic.pojo.StationPO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class StationRepositoryImpl implements StationRepository {

    private StationMapper stationMapper;
    public StationRepositoryImpl(StationMapper stationMapper) {
        this.stationMapper = stationMapper;
    }
    @Override
    public List<StationPO> selectStationList() {
        // selectList queryWrapper 用来指定查询条件
        // 查询所有,没有查询条件 可以传 null
        return stationMapper.selectList(null);
    }
    @Override
    public StationPO selectStationById(Integer id) {
        return stationMapper.selectById(id);
    }
}
